package com.chuangjiangx.member.basic.dao.model;

import java.math.BigDecimal;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;

public class InMbrPayGiftCardRuleExample {
    protected String orderByClause;

    protected boolean distinct;

    protected List<Criteria> oredCriteria;

    public InMbrPayGiftCardRuleExample() {
        oredCriteria = new ArrayList<Criteria>();
    }

    public void setOrderByClause(String orderByClause) {
        this.orderByClause = orderByClause;
    }

    public String getOrderByClause() {
        return orderByClause;
    }

    public void setDistinct(boolean distinct) {
        this.distinct = distinct;
    }

    public boolean isDistinct() {
        return distinct;
    }

    public List<Criteria> getOredCriteria() {
        return oredCriteria;
    }

    public void or(Criteria criteria) {
        oredCriteria.add(criteria);
    }

    public Criteria or() {
        Criteria criteria = createCriteriaInternal();
        oredCriteria.add(criteria);
        return criteria;
    }

    public Criteria createCriteria() {
        Criteria criteria = createCriteriaInternal();
        if (oredCriteria.size() == 0) {
            oredCriteria.add(criteria);
        }
        return criteria;
    }

    protected Criteria createCriteriaInternal() {
        Criteria criteria = new Criteria();
        return criteria;
    }

    public void clear() {
        oredCriteria.clear();
        orderByClause = null;
        distinct = false;
    }

    protected abstract static class GeneratedCriteria {
        protected List<Criterion> criteria;

        protected GeneratedCriteria() {
            super();
            criteria = new ArrayList<Criterion>();
        }

        public boolean isValid() {
            return criteria.size() > 0;
        }

        public List<Criterion> getAllCriteria() {
            return criteria;
        }

        public List<Criterion> getCriteria() {
            return criteria;
        }

        protected void addCriterion(String condition) {
            if (condition == null) {
                throw new RuntimeException("Value for condition cannot be null");
            }
            criteria.add(new Criterion(condition));
        }

        protected void addCriterion(String condition, Object value, String property) {
            if (value == null) {
                throw new RuntimeException("Value for " + property + " cannot be null");
            }
            criteria.add(new Criterion(condition, value));
        }

        protected void addCriterion(String condition, Object value1, Object value2, String property) {
            if (value1 == null || value2 == null) {
                throw new RuntimeException("Between values for " + property + " cannot be null");
            }
            criteria.add(new Criterion(condition, value1, value2));
        }

        public Criteria andIdIsNull() {
            addCriterion("impgcr.id is null");
            return (Criteria) this;
        }

        public Criteria andIdIsNotNull() {
            addCriterion("impgcr.id is not null");
            return (Criteria) this;
        }

        public Criteria andIdEqualTo(Long value) {
            addCriterion("impgcr.id =", value, "id");
            return (Criteria) this;
        }

        public Criteria andIdNotEqualTo(Long value) {
            addCriterion("impgcr.id <>", value, "id");
            return (Criteria) this;
        }

        public Criteria andIdGreaterThan(Long value) {
            addCriterion("impgcr.id >", value, "id");
            return (Criteria) this;
        }

        public Criteria andIdGreaterThanOrEqualTo(Long value) {
            addCriterion("impgcr.id >=", value, "id");
            return (Criteria) this;
        }

        public Criteria andIdLessThan(Long value) {
            addCriterion("impgcr.id <", value, "id");
            return (Criteria) this;
        }

        public Criteria andIdLessThanOrEqualTo(Long value) {
            addCriterion("impgcr.id <=", value, "id");
            return (Criteria) this;
        }

        public Criteria andIdIn(List<Long> values) {
            addCriterion("impgcr.id in", values, "id");
            return (Criteria) this;
        }

        public Criteria andIdNotIn(List<Long> values) {
            addCriterion("impgcr.id not in", values, "id");
            return (Criteria) this;
        }

        public Criteria andIdBetween(Long value1, Long value2) {
            addCriterion("impgcr.id between", value1, value2, "id");
            return (Criteria) this;
        }

        public Criteria andIdNotBetween(Long value1, Long value2) {
            addCriterion("impgcr.id not between", value1, value2, "id");
            return (Criteria) this;
        }

        public Criteria andMerchantIdIsNull() {
            addCriterion("impgcr.merchant_id is null");
            return (Criteria) this;
        }

        public Criteria andMerchantIdIsNotNull() {
            addCriterion("impgcr.merchant_id is not null");
            return (Criteria) this;
        }

        public Criteria andMerchantIdEqualTo(Long value) {
            addCriterion("impgcr.merchant_id =", value, "merchantId");
            return (Criteria) this;
        }

        public Criteria andMerchantIdNotEqualTo(Long value) {
            addCriterion("impgcr.merchant_id <>", value, "merchantId");
            return (Criteria) this;
        }

        public Criteria andMerchantIdGreaterThan(Long value) {
            addCriterion("impgcr.merchant_id >", value, "merchantId");
            return (Criteria) this;
        }

        public Criteria andMerchantIdGreaterThanOrEqualTo(Long value) {
            addCriterion("impgcr.merchant_id >=", value, "merchantId");
            return (Criteria) this;
        }

        public Criteria andMerchantIdLessThan(Long value) {
            addCriterion("impgcr.merchant_id <", value, "merchantId");
            return (Criteria) this;
        }

        public Criteria andMerchantIdLessThanOrEqualTo(Long value) {
            addCriterion("impgcr.merchant_id <=", value, "merchantId");
            return (Criteria) this;
        }

        public Criteria andMerchantIdIn(List<Long> values) {
            addCriterion("impgcr.merchant_id in", values, "merchantId");
            return (Criteria) this;
        }

        public Criteria andMerchantIdNotIn(List<Long> values) {
            addCriterion("impgcr.merchant_id not in", values, "merchantId");
            return (Criteria) this;
        }

        public Criteria andMerchantIdBetween(Long value1, Long value2) {
            addCriterion("impgcr.merchant_id between", value1, value2, "merchantId");
            return (Criteria) this;
        }

        public Criteria andMerchantIdNotBetween(Long value1, Long value2) {
            addCriterion("impgcr.merchant_id not between", value1, value2, "merchantId");
            return (Criteria) this;
        }

        public Criteria andBeginTimeIsNull() {
            addCriterion("impgcr.begin_time is null");
            return (Criteria) this;
        }

        public Criteria andBeginTimeIsNotNull() {
            addCriterion("impgcr.begin_time is not null");
            return (Criteria) this;
        }

        public Criteria andBeginTimeEqualTo(Date value) {
            addCriterion("impgcr.begin_time =", value, "beginTime");
            return (Criteria) this;
        }

        public Criteria andBeginTimeNotEqualTo(Date value) {
            addCriterion("impgcr.begin_time <>", value, "beginTime");
            return (Criteria) this;
        }

        public Criteria andBeginTimeGreaterThan(Date value) {
            addCriterion("impgcr.begin_time >", value, "beginTime");
            return (Criteria) this;
        }

        public Criteria andBeginTimeGreaterThanOrEqualTo(Date value) {
            addCriterion("impgcr.begin_time >=", value, "beginTime");
            return (Criteria) this;
        }

        public Criteria andBeginTimeLessThan(Date value) {
            addCriterion("impgcr.begin_time <", value, "beginTime");
            return (Criteria) this;
        }

        public Criteria andBeginTimeLessThanOrEqualTo(Date value) {
            addCriterion("impgcr.begin_time <=", value, "beginTime");
            return (Criteria) this;
        }

        public Criteria andBeginTimeIn(List<Date> values) {
            addCriterion("impgcr.begin_time in", values, "beginTime");
            return (Criteria) this;
        }

        public Criteria andBeginTimeNotIn(List<Date> values) {
            addCriterion("impgcr.begin_time not in", values, "beginTime");
            return (Criteria) this;
        }

        public Criteria andBeginTimeBetween(Date value1, Date value2) {
            addCriterion("impgcr.begin_time between", value1, value2, "beginTime");
            return (Criteria) this;
        }

        public Criteria andBeginTimeNotBetween(Date value1, Date value2) {
            addCriterion("impgcr.begin_time not between", value1, value2, "beginTime");
            return (Criteria) this;
        }

        public Criteria andEndTimeIsNull() {
            addCriterion("impgcr.end_time is null");
            return (Criteria) this;
        }

        public Criteria andEndTimeIsNotNull() {
            addCriterion("impgcr.end_time is not null");
            return (Criteria) this;
        }

        public Criteria andEndTimeEqualTo(Date value) {
            addCriterion("impgcr.end_time =", value, "endTime");
            return (Criteria) this;
        }

        public Criteria andEndTimeNotEqualTo(Date value) {
            addCriterion("impgcr.end_time <>", value, "endTime");
            return (Criteria) this;
        }

        public Criteria andEndTimeGreaterThan(Date value) {
            addCriterion("impgcr.end_time >", value, "endTime");
            return (Criteria) this;
        }

        public Criteria andEndTimeGreaterThanOrEqualTo(Date value) {
            addCriterion("impgcr.end_time >=", value, "endTime");
            return (Criteria) this;
        }

        public Criteria andEndTimeLessThan(Date value) {
            addCriterion("impgcr.end_time <", value, "endTime");
            return (Criteria) this;
        }

        public Criteria andEndTimeLessThanOrEqualTo(Date value) {
            addCriterion("impgcr.end_time <=", value, "endTime");
            return (Criteria) this;
        }

        public Criteria andEndTimeIn(List<Date> values) {
            addCriterion("impgcr.end_time in", values, "endTime");
            return (Criteria) this;
        }

        public Criteria andEndTimeNotIn(List<Date> values) {
            addCriterion("impgcr.end_time not in", values, "endTime");
            return (Criteria) this;
        }

        public Criteria andEndTimeBetween(Date value1, Date value2) {
            addCriterion("impgcr.end_time between", value1, value2, "endTime");
            return (Criteria) this;
        }

        public Criteria andEndTimeNotBetween(Date value1, Date value2) {
            addCriterion("impgcr.end_time not between", value1, value2, "endTime");
            return (Criteria) this;
        }

        public Criteria andLeastCostIsNull() {
            addCriterion("impgcr.least_cost is null");
            return (Criteria) this;
        }

        public Criteria andLeastCostIsNotNull() {
            addCriterion("impgcr.least_cost is not null");
            return (Criteria) this;
        }

        public Criteria andLeastCostEqualTo(BigDecimal value) {
            addCriterion("impgcr.least_cost =", value, "leastCost");
            return (Criteria) this;
        }

        public Criteria andLeastCostNotEqualTo(BigDecimal value) {
            addCriterion("impgcr.least_cost <>", value, "leastCost");
            return (Criteria) this;
        }

        public Criteria andLeastCostGreaterThan(BigDecimal value) {
            addCriterion("impgcr.least_cost >", value, "leastCost");
            return (Criteria) this;
        }

        public Criteria andLeastCostGreaterThanOrEqualTo(BigDecimal value) {
            addCriterion("impgcr.least_cost >=", value, "leastCost");
            return (Criteria) this;
        }

        public Criteria andLeastCostLessThan(BigDecimal value) {
            addCriterion("impgcr.least_cost <", value, "leastCost");
            return (Criteria) this;
        }

        public Criteria andLeastCostLessThanOrEqualTo(BigDecimal value) {
            addCriterion("impgcr.least_cost <=", value, "leastCost");
            return (Criteria) this;
        }

        public Criteria andLeastCostIn(List<BigDecimal> values) {
            addCriterion("impgcr.least_cost in", values, "leastCost");
            return (Criteria) this;
        }

        public Criteria andLeastCostNotIn(List<BigDecimal> values) {
            addCriterion("impgcr.least_cost not in", values, "leastCost");
            return (Criteria) this;
        }

        public Criteria andLeastCostBetween(BigDecimal value1, BigDecimal value2) {
            addCriterion("impgcr.least_cost between", value1, value2, "leastCost");
            return (Criteria) this;
        }

        public Criteria andLeastCostNotBetween(BigDecimal value1, BigDecimal value2) {
            addCriterion("impgcr.least_cost not between", value1, value2, "leastCost");
            return (Criteria) this;
        }

        public Criteria andMaxCostIsNull() {
            addCriterion("impgcr.max_cost is null");
            return (Criteria) this;
        }

        public Criteria andMaxCostIsNotNull() {
            addCriterion("impgcr.max_cost is not null");
            return (Criteria) this;
        }

        public Criteria andMaxCostEqualTo(BigDecimal value) {
            addCriterion("impgcr.max_cost =", value, "maxCost");
            return (Criteria) this;
        }

        public Criteria andMaxCostNotEqualTo(BigDecimal value) {
            addCriterion("impgcr.max_cost <>", value, "maxCost");
            return (Criteria) this;
        }

        public Criteria andMaxCostGreaterThan(BigDecimal value) {
            addCriterion("impgcr.max_cost >", value, "maxCost");
            return (Criteria) this;
        }

        public Criteria andMaxCostGreaterThanOrEqualTo(BigDecimal value) {
            addCriterion("impgcr.max_cost >=", value, "maxCost");
            return (Criteria) this;
        }

        public Criteria andMaxCostLessThan(BigDecimal value) {
            addCriterion("impgcr.max_cost <", value, "maxCost");
            return (Criteria) this;
        }

        public Criteria andMaxCostLessThanOrEqualTo(BigDecimal value) {
            addCriterion("impgcr.max_cost <=", value, "maxCost");
            return (Criteria) this;
        }

        public Criteria andMaxCostIn(List<BigDecimal> values) {
            addCriterion("impgcr.max_cost in", values, "maxCost");
            return (Criteria) this;
        }

        public Criteria andMaxCostNotIn(List<BigDecimal> values) {
            addCriterion("impgcr.max_cost not in", values, "maxCost");
            return (Criteria) this;
        }

        public Criteria andMaxCostBetween(BigDecimal value1, BigDecimal value2) {
            addCriterion("impgcr.max_cost between", value1, value2, "maxCost");
            return (Criteria) this;
        }

        public Criteria andMaxCostNotBetween(BigDecimal value1, BigDecimal value2) {
            addCriterion("impgcr.max_cost not between", value1, value2, "maxCost");
            return (Criteria) this;
        }

        public Criteria andGetChannelListIsNull() {
            addCriterion("impgcr.get_channel_list is null");
            return (Criteria) this;
        }

        public Criteria andGetChannelListIsNotNull() {
            addCriterion("impgcr.get_channel_list is not null");
            return (Criteria) this;
        }

        public Criteria andGetChannelListEqualTo(String value) {
            addCriterion("impgcr.get_channel_list =", value, "getChannelList");
            return (Criteria) this;
        }

        public Criteria andGetChannelListNotEqualTo(String value) {
            addCriterion("impgcr.get_channel_list <>", value, "getChannelList");
            return (Criteria) this;
        }

        public Criteria andGetChannelListGreaterThan(String value) {
            addCriterion("impgcr.get_channel_list >", value, "getChannelList");
            return (Criteria) this;
        }

        public Criteria andGetChannelListGreaterThanOrEqualTo(String value) {
            addCriterion("impgcr.get_channel_list >=", value, "getChannelList");
            return (Criteria) this;
        }

        public Criteria andGetChannelListLessThan(String value) {
            addCriterion("impgcr.get_channel_list <", value, "getChannelList");
            return (Criteria) this;
        }

        public Criteria andGetChannelListLessThanOrEqualTo(String value) {
            addCriterion("impgcr.get_channel_list <=", value, "getChannelList");
            return (Criteria) this;
        }

        public Criteria andGetChannelListLike(String value) {
            addCriterion("impgcr.get_channel_list like", value, "getChannelList");
            return (Criteria) this;
        }

        public Criteria andGetChannelListNotLike(String value) {
            addCriterion("impgcr.get_channel_list not like", value, "getChannelList");
            return (Criteria) this;
        }

        public Criteria andGetChannelListIn(List<String> values) {
            addCriterion("impgcr.get_channel_list in", values, "getChannelList");
            return (Criteria) this;
        }

        public Criteria andGetChannelListNotIn(List<String> values) {
            addCriterion("impgcr.get_channel_list not in", values, "getChannelList");
            return (Criteria) this;
        }

        public Criteria andGetChannelListBetween(String value1, String value2) {
            addCriterion("impgcr.get_channel_list between", value1, value2, "getChannelList");
            return (Criteria) this;
        }

        public Criteria andGetChannelListNotBetween(String value1, String value2) {
            addCriterion("impgcr.get_channel_list not between", value1, value2, "getChannelList");
            return (Criteria) this;
        }

        public Criteria andWxRuleIdIsNull() {
            addCriterion("impgcr.wx_rule_id is null");
            return (Criteria) this;
        }

        public Criteria andWxRuleIdIsNotNull() {
            addCriterion("impgcr.wx_rule_id is not null");
            return (Criteria) this;
        }

        public Criteria andWxRuleIdEqualTo(String value) {
            addCriterion("impgcr.wx_rule_id =", value, "wxRuleId");
            return (Criteria) this;
        }

        public Criteria andWxRuleIdNotEqualTo(String value) {
            addCriterion("impgcr.wx_rule_id <>", value, "wxRuleId");
            return (Criteria) this;
        }

        public Criteria andWxRuleIdGreaterThan(String value) {
            addCriterion("impgcr.wx_rule_id >", value, "wxRuleId");
            return (Criteria) this;
        }

        public Criteria andWxRuleIdGreaterThanOrEqualTo(String value) {
            addCriterion("impgcr.wx_rule_id >=", value, "wxRuleId");
            return (Criteria) this;
        }

        public Criteria andWxRuleIdLessThan(String value) {
            addCriterion("impgcr.wx_rule_id <", value, "wxRuleId");
            return (Criteria) this;
        }

        public Criteria andWxRuleIdLessThanOrEqualTo(String value) {
            addCriterion("impgcr.wx_rule_id <=", value, "wxRuleId");
            return (Criteria) this;
        }

        public Criteria andWxRuleIdLike(String value) {
            addCriterion("impgcr.wx_rule_id like", value, "wxRuleId");
            return (Criteria) this;
        }

        public Criteria andWxRuleIdNotLike(String value) {
            addCriterion("impgcr.wx_rule_id not like", value, "wxRuleId");
            return (Criteria) this;
        }

        public Criteria andWxRuleIdIn(List<String> values) {
            addCriterion("impgcr.wx_rule_id in", values, "wxRuleId");
            return (Criteria) this;
        }

        public Criteria andWxRuleIdNotIn(List<String> values) {
            addCriterion("impgcr.wx_rule_id not in", values, "wxRuleId");
            return (Criteria) this;
        }

        public Criteria andWxRuleIdBetween(String value1, String value2) {
            addCriterion("impgcr.wx_rule_id between", value1, value2, "wxRuleId");
            return (Criteria) this;
        }

        public Criteria andWxRuleIdNotBetween(String value1, String value2) {
            addCriterion("impgcr.wx_rule_id not between", value1, value2, "wxRuleId");
            return (Criteria) this;
        }

        public Criteria andWxStatusIsNull() {
            addCriterion("impgcr.wx_status is null");
            return (Criteria) this;
        }

        public Criteria andWxStatusIsNotNull() {
            addCriterion("impgcr.wx_status is not null");
            return (Criteria) this;
        }

        public Criteria andWxStatusEqualTo(Integer value) {
            addCriterion("impgcr.wx_status =", value, "wxStatus");
            return (Criteria) this;
        }

        public Criteria andWxStatusNotEqualTo(Integer value) {
            addCriterion("impgcr.wx_status <>", value, "wxStatus");
            return (Criteria) this;
        }

        public Criteria andWxStatusGreaterThan(Integer value) {
            addCriterion("impgcr.wx_status >", value, "wxStatus");
            return (Criteria) this;
        }

        public Criteria andWxStatusGreaterThanOrEqualTo(Integer value) {
            addCriterion("impgcr.wx_status >=", value, "wxStatus");
            return (Criteria) this;
        }

        public Criteria andWxStatusLessThan(Integer value) {
            addCriterion("impgcr.wx_status <", value, "wxStatus");
            return (Criteria) this;
        }

        public Criteria andWxStatusLessThanOrEqualTo(Integer value) {
            addCriterion("impgcr.wx_status <=", value, "wxStatus");
            return (Criteria) this;
        }

        public Criteria andWxStatusIn(List<Integer> values) {
            addCriterion("impgcr.wx_status in", values, "wxStatus");
            return (Criteria) this;
        }

        public Criteria andWxStatusNotIn(List<Integer> values) {
            addCriterion("impgcr.wx_status not in", values, "wxStatus");
            return (Criteria) this;
        }

        public Criteria andWxStatusBetween(Integer value1, Integer value2) {
            addCriterion("impgcr.wx_status between", value1, value2, "wxStatus");
            return (Criteria) this;
        }

        public Criteria andWxStatusNotBetween(Integer value1, Integer value2) {
            addCriterion("impgcr.wx_status not between", value1, value2, "wxStatus");
            return (Criteria) this;
        }

        public Criteria andCreateTimeIsNull() {
            addCriterion("impgcr.create_time is null");
            return (Criteria) this;
        }

        public Criteria andCreateTimeIsNotNull() {
            addCriterion("impgcr.create_time is not null");
            return (Criteria) this;
        }

        public Criteria andCreateTimeEqualTo(Date value) {
            addCriterion("impgcr.create_time =", value, "createTime");
            return (Criteria) this;
        }

        public Criteria andCreateTimeNotEqualTo(Date value) {
            addCriterion("impgcr.create_time <>", value, "createTime");
            return (Criteria) this;
        }

        public Criteria andCreateTimeGreaterThan(Date value) {
            addCriterion("impgcr.create_time >", value, "createTime");
            return (Criteria) this;
        }

        public Criteria andCreateTimeGreaterThanOrEqualTo(Date value) {
            addCriterion("impgcr.create_time >=", value, "createTime");
            return (Criteria) this;
        }

        public Criteria andCreateTimeLessThan(Date value) {
            addCriterion("impgcr.create_time <", value, "createTime");
            return (Criteria) this;
        }

        public Criteria andCreateTimeLessThanOrEqualTo(Date value) {
            addCriterion("impgcr.create_time <=", value, "createTime");
            return (Criteria) this;
        }

        public Criteria andCreateTimeIn(List<Date> values) {
            addCriterion("impgcr.create_time in", values, "createTime");
            return (Criteria) this;
        }

        public Criteria andCreateTimeNotIn(List<Date> values) {
            addCriterion("impgcr.create_time not in", values, "createTime");
            return (Criteria) this;
        }

        public Criteria andCreateTimeBetween(Date value1, Date value2) {
            addCriterion("impgcr.create_time between", value1, value2, "createTime");
            return (Criteria) this;
        }

        public Criteria andCreateTimeNotBetween(Date value1, Date value2) {
            addCriterion("impgcr.create_time not between", value1, value2, "createTime");
            return (Criteria) this;
        }

        public Criteria andUpdateTimeIsNull() {
            addCriterion("impgcr.update_time is null");
            return (Criteria) this;
        }

        public Criteria andUpdateTimeIsNotNull() {
            addCriterion("impgcr.update_time is not null");
            return (Criteria) this;
        }

        public Criteria andUpdateTimeEqualTo(Date value) {
            addCriterion("impgcr.update_time =", value, "updateTime");
            return (Criteria) this;
        }

        public Criteria andUpdateTimeNotEqualTo(Date value) {
            addCriterion("impgcr.update_time <>", value, "updateTime");
            return (Criteria) this;
        }

        public Criteria andUpdateTimeGreaterThan(Date value) {
            addCriterion("impgcr.update_time >", value, "updateTime");
            return (Criteria) this;
        }

        public Criteria andUpdateTimeGreaterThanOrEqualTo(Date value) {
            addCriterion("impgcr.update_time >=", value, "updateTime");
            return (Criteria) this;
        }

        public Criteria andUpdateTimeLessThan(Date value) {
            addCriterion("impgcr.update_time <", value, "updateTime");
            return (Criteria) this;
        }

        public Criteria andUpdateTimeLessThanOrEqualTo(Date value) {
            addCriterion("impgcr.update_time <=", value, "updateTime");
            return (Criteria) this;
        }

        public Criteria andUpdateTimeIn(List<Date> values) {
            addCriterion("impgcr.update_time in", values, "updateTime");
            return (Criteria) this;
        }

        public Criteria andUpdateTimeNotIn(List<Date> values) {
            addCriterion("impgcr.update_time not in", values, "updateTime");
            return (Criteria) this;
        }

        public Criteria andUpdateTimeBetween(Date value1, Date value2) {
            addCriterion("impgcr.update_time between", value1, value2, "updateTime");
            return (Criteria) this;
        }

        public Criteria andUpdateTimeNotBetween(Date value1, Date value2) {
            addCriterion("impgcr.update_time not between", value1, value2, "updateTime");
            return (Criteria) this;
        }
    }

    public static class Criteria extends GeneratedCriteria {

        protected Criteria() {
            super();
        }
    }

    public static class Criterion {
        private String condition;

        private Object value;

        private Object secondValue;

        private boolean noValue;

        private boolean singleValue;

        private boolean betweenValue;

        private boolean listValue;

        private String typeHandler;

        public String getCondition() {
            return condition;
        }

        public Object getValue() {
            return value;
        }

        public Object getSecondValue() {
            return secondValue;
        }

        public boolean isNoValue() {
            return noValue;
        }

        public boolean isSingleValue() {
            return singleValue;
        }

        public boolean isBetweenValue() {
            return betweenValue;
        }

        public boolean isListValue() {
            return listValue;
        }

        public String getTypeHandler() {
            return typeHandler;
        }

        protected Criterion(String condition) {
            super();
            this.condition = condition;
            this.typeHandler = null;
            this.noValue = true;
        }

        protected Criterion(String condition, Object value, String typeHandler) {
            super();
            this.condition = condition;
            this.value = value;
            this.typeHandler = typeHandler;
            if (value instanceof List<?>) {
                this.listValue = true;
            } else {
                this.singleValue = true;
            }
        }

        protected Criterion(String condition, Object value) {
            this(condition, value, null);
        }

        protected Criterion(String condition, Object value, Object secondValue, String typeHandler) {
            super();
            this.condition = condition;
            this.value = value;
            this.secondValue = secondValue;
            this.typeHandler = typeHandler;
            this.betweenValue = true;
        }

        protected Criterion(String condition, Object value, Object secondValue) {
            this(condition, value, secondValue, null);
        }
    }
}